<template>
    <div class="next-info">
        <p v-if="prev.id">上一篇：
            <router-link :to="'/article/' + prev.id">
                {{ prev.title }}
            </router-link>
        </p>
        <p v-if="next.id">下一篇：
            <router-link :to="'/article/' + next.id">
                {{ next.title }}
            </router-link>
        </p>
    </div>
</template>

<script>
    import {mapState} from 'vuex'
    export default {
        name: "Other",
        computed: mapState('article', [
            'next',
            'prev',
        ])
    }
</script>

<style scoped>

</style>